Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate STAC Catalog and Bbox field on Databrowser #72

Merged
merged 12 commits into from
Feb 12, 2025
Merged

Conversation

mo-dkrz
Copy link
Contributor

@mo-dkrz mo-dkrz commented Jan 31, 2025

This PR adds support for accessing both dynamic and static STAC (SpatioTemporal Asset Catalog) based on user search parameters. It also improves the data browser by introducing a bounding box field for selecting and validating coordinates.

  • BBoxSelector: Make users able to search based on the bounding box coordinates.
  • CatalogExportDropdown: Provides options for exporting catalogs, including STAC dynamic and static catalogs.

@mo-dkrz mo-dkrz requested a review from Karinon January 31, 2025 15:52
@mo-dkrz
Copy link
Contributor Author

mo-dkrz commented Feb 3, 2025

To play around with on production, it's running on dev machine and working for all datasets.

Copy link
Collaborator

@Karinon Karinon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only a few minor things. Nice work.

<InputGroup.Text>North</InputGroup.Text>
<Form.Control
value={maxLat}
placeholder="e.g. 10"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in case of the bounding box, I think it would make more sense to write the min and max values into the placeholder

};

const isValidLatitude = (value) => {
const num = parseFloat(value);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

parseFloat will parse strings like 12blabla to 12. Hence, both isValid..-Function will return true for this kind of string. If you then try to apply this search parameter, the website will crash.

<div className="d-flex gap-3 mb-2">
<div className="flex-grow-1">
<InputGroup>
<InputGroup.Text>West</InputGroup.Text>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As Martin already said, I think it would be better to talk about longitudes and latitudes. I am also confused that it says West, East, etc. but the error messages are mentioning min longitude etc.

maxLat &&
parseFloat(minLat) > parseFloat(maxLat)
) {
errorMessage = "Max latitude must be greater than min latitude";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like it if error messages like this would also appear in the minLatError or the maxLatError (one is enough I guess) and not only in the tooltip.

</div>
</div>

<div className="d-flex gap-3 mb-3">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The flex-box is changing sizes when an error message appears below. I think I would prefer something grid-based instead

@mo-dkrz mo-dkrz requested a review from Karinon February 11, 2025 20:13
@mo-dkrz
Copy link
Contributor Author

mo-dkrz commented Feb 11, 2025

Thanks for the review!
There is an issue related to not possesing the clear-all button when we select bbox, that I'm aware of and I will find a solution for it in next commits:

image

@mo-dkrz
Copy link
Contributor Author

mo-dkrz commented Feb 12, 2025

it's done from my side, could you please review this again, thanks!

Copy link
Collaborator

@Karinon Karinon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mo-dkrz mo-dkrz merged commit b4fa994 into main Feb 12, 2025
3 checks passed
@mo-dkrz mo-dkrz deleted the stac-catalog branch February 12, 2025 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants